package com.qingcheng.service;

import com.qingcheng.entity.PageResult;
import com.qingcheng.pojo.goods.*;

import java.util.*;

/**
 * category业务逻辑层
 */
public interface CategoryService {


    public List<Category> findAll();


    public PageResult<Category> findPage(int page, int size);


    public List<Category> findList(Map<String,Object> searchMap);


    public PageResult<Category> findPage(Map<String,Object> searchMap,int page, int size);


    public Category findById(Integer id);

    public void add(Category category);


    public void update(Category category);


    public void delete(Integer id);

    /**
     *
     * @param categories
     * @param parentId
     * @return
     */
    List<Map> findByParentId(List<Category> categories,Integer parentId);

    /**
     * 查询所有的菜单
     * [
     *     id: 1,
     *     name: a,
     *     children: []
     * ]
     * @return
     */
    List findAllMenus();

    List findAllCategory();
}
